package game.util.xml;

/**
 * A help class used to do write things in xml file.
 * 
 * @author Linzy
 * Create Date: 2009 9 7 11:07:28
 * 
 */
public class XmlWriter {
	
	/**
	 * Write a tag with specified tag name and value.<br/>
	 * Effect example:
	 * < tmplTag > value < / tmplTag >
	 *  
	 * @param buff	StringBuffer;
	 * @param tmplTag	String; A tag you want to use in xml. 
	 * @param value	String; The tag value.
	 */
	public static void writeTag(StringBuffer buff, String tmplTag, String value){
		String head = "<" + tmplTag + ">";
		String tail = "</" + tmplTag + ">";
		buff.append(head);
		buff.append(value);
		buff.append(tail);
	} // writeTag()
	
} // end of class
